import { createStore, combineReducers } from "redux";

// 2. 引入reducer
import reducer from "./reducer.js";

// 3.创建一个store

const store = createStore(reducer)

export default store;



/*
https://www.jianshu.com/p/857ed93abb1f
*  别的资料中使用这种方式创建store  层级不同 原理相同
* import { createStore, combineReducers } from "redux";
import { calculate } from "./calculate";

// 全局你可以创建多个reducer 在这里统一在一起
const rootReducers = combineReducers({calculate})
// 全局就管理一个store
export const store = createStore(rootReducers)
*
* */
